package books;

public class Book {
    // 定义多个私有变量来存储书籍的变量
    private String name;
    private String author;
    private int price;
    private String type;
    private boolean isborrow;
    public Book(String name, String author, int price, String type) {
        //将传回来的参数给对象赋值
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }
    // 获取并设置书籍类型,然后进行返回
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getAuthor() {
        return author;
    }
    public void setAuthor(String author) {
        this.author = author;
    }
    public int getPrice() {
        return price;
    }
    public void setPrice(int price) {
        this.price = price;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public boolean getIsborrow() {
        return isborrow;
    }
    public void setIsborrow(boolean isborrow) {
        this.isborrow = isborrow;
    }

}
